load("@build_bazel_rules_android//android:rules.bzl", "android_library")

licenses(["notice"])

package(default_visibility = ["//visibility:public"])

java_library(
    name = "key_derivation_config",
    srcs = ["KeyDerivationConfig.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink/config:tink_fips",
        "//src/main/java/com/google/crypto/tink/keyderivation/internal:keyset_deriver_wrapper",
        "//src/main/java/com/google/crypto/tink/keyderivation/internal:prf_based_deriver_key_manager",
        "//src/main/java/com/google/crypto/tink/prf:hkdf_prf_key_manager",
    ],
)

java_library(
    name = "keyset_deriver",
    srcs = ["KeysetDeriver.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:registry_cluster",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "keyset_deriver_wrapper",
    srcs = ["KeysetDeriverWrapper.java"],
    deps = ["//src/main/java/com/google/crypto/tink/keyderivation/internal:keyset_deriver_wrapper"],
)

android_library(
    name = "key_derivation_config-android",
    srcs = ["KeyDerivationConfig.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink/config:tink_fips-android",
        "//src/main/java/com/google/crypto/tink/keyderivation/internal:keyset_deriver_wrapper-android",
        "//src/main/java/com/google/crypto/tink/keyderivation/internal:prf_based_deriver_key_manager-android",
        "//src/main/java/com/google/crypto/tink/prf:hkdf_prf_key_manager-android",
    ],
)

android_library(
    name = "keyset_deriver-android",
    srcs = ["KeysetDeriver.java"],
    deps = [
        "//src/main/java/com/google/crypto/tink:registry_cluster-android",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "keyset_deriver_wrapper-android",
    srcs = ["KeysetDeriverWrapper.java"],
    deps = ["//src/main/java/com/google/crypto/tink/keyderivation/internal:keyset_deriver_wrapper-android"],
)

android_library(
    name = "key_derivation_key-android",
    srcs = ["KeyDerivationKey.java"],
    deps = [
        ":key_derivation_parameters-android",
        "//src/main/java/com/google/crypto/tink:key-android",
    ],
)

android_library(
    name = "key_derivation_parameters-android",
    srcs = ["KeyDerivationParameters.java"],
    deps = ["//src/main/java/com/google/crypto/tink:parameters-android"],
)

java_library(
    name = "key_derivation_key",
    srcs = ["KeyDerivationKey.java"],
    deps = [
        ":key_derivation_parameters",
        "//src/main/java/com/google/crypto/tink:key",
    ],
)

java_library(
    name = "key_derivation_parameters",
    srcs = ["KeyDerivationParameters.java"],
    deps = ["//src/main/java/com/google/crypto/tink:parameters"],
)

java_library(
    name = "prf_based_key_derivation_parameters",
    srcs = ["PrfBasedKeyDerivationParameters.java"],
    deps = [
        ":key_derivation_parameters",
        "//src/main/java/com/google/crypto/tink:parameters",
        "//src/main/java/com/google/crypto/tink/prf:prf_parameters",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "prf_based_key_derivation_parameters-android",
    srcs = ["PrfBasedKeyDerivationParameters.java"],
    deps = [
        ":key_derivation_parameters-android",
        "//src/main/java/com/google/crypto/tink:parameters-android",
        "//src/main/java/com/google/crypto/tink/prf:prf_parameters-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

android_library(
    name = "prf_based_key_derivation_key-android",
    srcs = ["PrfBasedKeyDerivationKey.java"],
    deps = [
        ":key_derivation_key-android",
        ":prf_based_key_derivation_parameters-android",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key-android",
        "//src/main/java/com/google/crypto/tink:key-android",
        "//src/main/java/com/google/crypto/tink/prf:prf_key-android",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)

java_library(
    name = "prf_based_key_derivation_key",
    srcs = ["PrfBasedKeyDerivationKey.java"],
    deps = [
        ":key_derivation_key",
        ":prf_based_key_derivation_parameters",
        "//src/main/java/com/google/crypto/tink:accesses_partial_key",
        "//src/main/java/com/google/crypto/tink:key",
        "//src/main/java/com/google/crypto/tink/prf:prf_key",
        "@maven//:com_google_code_findbugs_jsr305",
        "@maven//:com_google_errorprone_error_prone_annotations",
    ],
)
